docs: Clarify gtk_render_icon()'s behaviour
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 4 Nov 2015 11:45:41 +0000 (11:45 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 4 Nov 2015 11:45:41 +0000 (11:45 +0000)
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.

You should be using gtk_render_icon_surface() anyway.

gtk/gtkrender.c

index 20c014d172e1d046ec85dbaa3eeb5207b9006d00..4f986bbf5afff5c70bc714fcf5d8e6a3b733e21f 100644 (file)
@@ -1205,6 +1205,13 @@ gtk_render_icon_pixbuf (GtkStyleContext     *context,
  *
  * Renders the icon in @pixbuf at the specified @x and @y coordinates.
  *
+ * This function will render the icon in @pixbuf at exactly its size,
+ * regardless of scaling factors, which may not be appropriate when
+ * drawing on displays with high pixel densities.
+ *
+ * You probably want to use gtk_render_icon_surface() instead, if you
+ * already have a Cairo surface.
+ *
  * Since: 3.2
  **/
 void